package com.lyj.io.module.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lyj.io.common.utils.PageUtils;
import com.lyj.io.common.utils.Query;
import com.lyj.io.module.sys.dao.SysRoleDao;
import com.lyj.io.module.sys.entity.SysRole;
import com.lyj.io.module.sys.service.SysRoleService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 用户接口
 * @author: 李亚杰
 * @version: 1.0
 * @date: 2021/8/19 14:31
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRole> implements SysRoleService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        QueryWrapper<SysRole> queryWrapper = new QueryWrapper<SysRole>();
        queryWrapper.eq("delete_flag", "0");
        IPage<SysRole> page = this.page(
                new Query<SysRole>().getPage(params),
                queryWrapper
        );
        return new PageUtils(page);
    }
}
